﻿@model RXY_Mall.Application.Order.Dto.GetOrderGroupOutput

@section CSS{
    <link href="~/Content/css/layerui/layui.css" rel="stylesheet" />
}
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <section class="content-header">
        <h1>
            拼手气
            <small>详情</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="#">销售管理</a></li>
            <li><a href="/Order/LuckGroupOrders">拼手气列表</a></li>
            <li class="active">拼手气详情</li>
        </ol>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <!-- general form elements -->
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title">拼手气信息</h3>
                    </div>
                    <!-- /.box-header -->
                    <!-- form start -->
                    <form role="form">
                        <div class="box-body">
                            <table class="table table-bordered table-striped table-hover ">
                                <thead>
                                    <tr>
                                        <td>拼单号</td>
                                        <td>图片</td>
                                        <td>商品名</td>
                                        <td>需要人数</td>
                                        <td>参与人数</td>
                                        <td>红包金额</td>
                                        <td>开始时间</td>
                                        <td>结束时间</td>
                                        <td>拼单状态</td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>@Model.group_no</td>
                                        <td><img id="img" style="width:80px;height:80px;margin: auto;" /></td>
                                        <td><a style="color:seagreen" target="_blank" href="/goods/EditGoods/@Model.goods_id">@Model.goods_name</a></td>
                                        <td>@Model.require_num</td>
                                        <td>@Model.user_num</td>
                                        <td>@Model.red_packet</td>
                                        <td>@Model.add_time</td>
                                        <td>@Model.expire_time</td>
                                        <td>@Model.group_status</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <!-- /.box-body -->
                    </form>
                </div>
                <!-- /.box -->
            </div>

            <div class="col-md-12">
                <!-- general form elements -->
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title">参与人</h3>
                    </div>
                    <!-- /.box-header -->
                    <!-- form start -->
                    <form role="form">
                        <div class="box-body">
                            <table class="table table-bordered table-striped table-hover ">
                                <thead>
                                    <tr>
                                        <td>用户(账号)</td>
                                        <td>订单号</td>
                                        <td>是否拼主</td>
                                        <td>参与时间</td>
                                        <td>是否获得商品</td>
                                        <td>鼓励金金额</td>
                                        <td>领取时间</td>
                                    </tr>
                                </thead>
                                <tbody>
                                    @foreach (var item in Model.group_users)
                                    {
                                        <tr>
                                            <td>@item.user_name</td>
                                            <td><a href="~/Order/GoodsOrder/@item.order_id" target="_blank" style="color:seagreen">@item.order_no</a></td>
                                            <td>@{var aa = item.is_leader ? "是" : "否";@aa}</td>
                                            <td>@item.add_time</td>
                                            <td>
                                                @{ var bb = "是";}
                                                @if (item.is_award == null)
                                                {
                                                    bb = "";
                                                }
                                                else if ((bool)item.is_award == false)
                                                {
                                                    bb = "否";
                                                }
                                                @bb
                                            </td>
                                            <td>@item.acquire_red_packet</td>
                                            <td>@item.acquire_time</td>
                                        </tr>
                                    }
                                </tbody>
                            </table>
                        </div>
                        <!-- /.box-body -->
                    </form>
                </div>
                <!-- /.box -->
            </div>
        </div>
    </section>

</div>
@section JS{
    <script>
        $(function () {
            var img= domain + '@Model.goods_picture_url';
            $("#img").attr("src",img);
         });
    </script>
}
